<!--
 * @Descripttion: 
 * @version: 
 * @Author: Zuo
 * @Date: 2021-07-30 13:43:52
 * @LastEditors: Zuo
 * @LastEditTime: 2021-07-30 14:20:14
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //1.创建promise对象
        const p = new Promise ((resolve,reject)=>{ //执行器函数 同步   
            //执行异步操作
            //成功 resolve(value)
            //失败 reject(reason)
        })

        p.then(
            value =>{   //成功的 onResolved

            },
            reason =>{ //失败 onRejected

            }
        )
    </script>
</body>
</html>